package com.lu.sb210207.task;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class MyJob1 implements Job {

    //获取spring 上下文的Bean
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        // 执行业务逻辑
        System.out.println("这是一个简单的Job任务调度实例"+ new Date().toLocaleString());
    }

}
